﻿ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="showHead.aspx.cs" Inherits="cwdz.showhead" EnableSessionState="ReadOnly" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form" runat="server">
    <div>
        <br />
        <table style="width: 100%;">
            <tr>
                <td>
                    &nbsp;
                </td>
                <td style="text-align: center">
                    好收成超市应付经销结算单列表
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td style="text-align: right">
                    <asp:Label ID="showDateLabel" ForeColor="Red" runat="server" />
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td style="width: 760px;">
                    
                        &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td style="width: 760px;">
                    
                        <asp:GridView ID="GridView_head" runat="server" AutoGenerateColumns="False" BackColor="White"
                            BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" DataSourceID="OraDataSource"
                            EnableModelValidation="True" DataKeyNames="BILLNO" ForeColor="Black" GridLines="Vertical"
                            PageSize="100" Width="760px" OnSelectedIndexChanged="GridView_head_SelectedIndexChanged">
                            <EmptyDataTemplate>系统中没有查询到您的记录。</EmptyDataTemplate>
                            <AlternatingRowStyle BackColor="White" />
                            <Columns>
                                <asp:BoundField DataField="ORGNAME" HeaderText="组织名称" SortExpression="ORGNAME" 
                                    ReadOnly="True">
                                    </asp:BoundField>
                                    <asp:BoundField DataField="SUPCODE" HeaderText="SUPCODE" SortExpression="SUPCODEE" 
                                    ReadOnly="True" Visible="False">
                                    </asp:BoundField>
                                    <asp:BoundField DataField="SUPNAME" HeaderText="SUPNAME" SortExpression="SUPNAM" 
                                    ReadOnly="True" Visible="False">
                                    </asp:BoundField>
                                    <asp:BoundField DataField="HTCODE" HeaderText="HTCODE" SortExpression="HTCODE" 
                                    ReadOnly="True" Visible="False">
                                    </asp:BoundField>
                                    <asp:BoundField DataField="HTNAME" HeaderText="HTNAME" SortExpression="HTNAME" 
                                    ReadOnly="True" Visible="False">
                                    </asp:BoundField>

                                <asp:BoundField DataField="BILLNO" HeaderText="单据号" ReadOnly="True" SortExpression="BILLNO">
                                </asp:BoundField>
                                <asp:BoundField DataField="LRDATE" HeaderText="录入日期" SortExpression="JZDATE"></asp:BoundField>
                                <asp:BoundField DataField="HYFTOTAL" HeaderText="含税进价金额" SortExpression="HYFTOTAL">
                                    <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <asp:BoundField DataField="WYFTOTAL" HeaderText="无税进价金额" SortExpression="WYFTOTAL">
                                    <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <asp:BoundField DataField="JTAXTOTAL" HeaderText="进项税额" SortExpression="JTAXTOTAL">
                                    <ItemStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                <asp:HyperLinkField DataNavigateUrlFormatString="showBody.aspx?billNo={0}&amp;OrgName={1}&amp;SupCode={2}&amp;SupName={3}&amp;HtCode={4}&amp;HtName={5}" HeaderText="明细"
                                    Text="查看" DataNavigateUrlFields="billNo,OrgName,SupCode,SupName,HtCode,HtName" InsertVisible="False" 
                                    NavigateUrl="~/showBody.aspx" />
                            </Columns>
                            <FooterStyle BackColor="#CCCC99" />
                            <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                            <RowStyle BackColor="#F7F7DE" />
                            <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                        </asp:GridView>
                    
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    <asp:Label ID="BgDateLabel" runat="server" Visible="False"></asp:Label>
                    <asp:Label ID="EdDateLabel" runat="server" Visible="False"></asp:Label>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
        </table>
        <br />
        <asp:SqlDataSource ID="OraDataSource" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionStringOra %>"
            ProviderName="<%$ ConnectionStrings:ConnectionStringOra.ProviderName %>" 
            SelectCommand="SELECT ORGNAME, BILLNO, SUPCODE, SUPNAME, HTCODE, HTNAME, LRDATE, HYFTOTAL, WYFTOTAL, JTAXTOTAL FROM TACPJSHEAD WHERE SUPCODE = ? AND LRDATE &gt;= ? AND LRDATE &lt;= ? ORDER BY JZDATE">
            <SelectParameters>
                <asp:SessionParameter Name="SUPCODE" SessionField="UserName" Type="String" />
                <asp:ControlParameter ControlID="BgDateLabel" Name="LRDATE" PropertyName="Text" Type="DateTime" />
                <asp:ControlParameter ControlID="EdDateLabel" Name="LRDATE2" PropertyName="Text"
                    Type="DateTime" />
            </SelectParameters>
        </asp:SqlDataSource>
    </div>
    </form>
</body>
</html>
